<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <title>HTML5-pre,code标记</title>
        <style type="text/css">
            pre {
                border: 1px solid gray;
            }
        </style>
    </head>
    <body>
        <main role="main">
            <h1>这里显示一段javascript代码</h1>
            <pre>
                <code class="language-javascript">
var myStr = "Hello world!";
var myInt = 1;

if (myInt == 1) {
    alert(myStr);
}
                </code>
            </pre>
            <p>javascript是网页开发的必备语言，今后会学到的。</p>
        </main>
    </body>
</html>